import booleanPointInPolygon from '@turf/boolean-point-in-polygon'
import { point, polygon } from '@turf/helpers'
function isInChina(pt, pol) {
  const turfPt = point(pt)
  let bool = false
  pol.features[0].geometry.coordinates.some((poly) => {
    const turfPol = polygon([poly])
    bool = booleanPointInPolygon(turfPt, turfPol)
    console.log(bool)
    if (bool) return true
  })
  return bool
}
export { isInChina }
